package com.cqut.forum.dao;

import java.util.List;
import java.util.Map;

import com.cqut.forum.entity.Article;
import com.cqut.forum.entity.User;

/**
 * 博客、花园、帖子、心情数据访问层
 * @author yangxun
 */
public interface ArticleDao extends BaseDao {
	
	public List<Map<String, Object>> getCareUnread(int userId,int moduleId,int index,int size);
	
	public List<Map<String, Object>> getAllUnread(int userId,int moduleId,int index,int size);
	/**
	 * 只获取好友的动态
	 * @param userId
	 * @param moduleId
	 * @param index
	 * @param size
	 * @return
	 */
	public List<Map<String, Object>> getUserInfo(int userId,int moduleId,int index,int size);
	
	public List<Map<String, Object>> getHotArticle(int index,int size);
	
	public Map<String, Object> getById(int articleId);
	
	public List<Map<String, Object>> get(int index,int size,int moduleId);
	
	public List<Map<String, Object>> getByOwnerId(int moduleId,int userId,int index,int size);
	
	public List<Article> getByGroupId(int moduleId,int groupId,int index,int size);
	
	public List<Map<String, Object>> getByOwnerId(int moduleId,String keyWords,int userId,int index,int size);
	
	public String getArticleGroupName(int articleId);
	
	public List<Map<String, Object>> getArticleVisitor(int articleId);
	
	public List<Map<String, Object>> getArticleByCase(int userId,int moduleId,int index,int size,String option);
	
	public List<User> getHotArticleUser(int index,int size);
	
	public List<Map<String, Object>> getModuleVisitors(int userId,int moduelId,int index,int size);

	public boolean haveReadMyArticle(int userId,int moduleId);
	
	public List<Map<String, Object>> getArticles(String articleOwner,String articleTitle,String publishTime,
			int moduleId,int index,int size);
	
	public boolean updateArticleState(int userId,int articleId,boolean state);
	
	public List<Map<String, Object>> loadGardens(int userId,String publishTime,
			String ballKind, String userRelation, int moduleId,int index, int size);
	
	public int count(int userId,int moduleId);
	
	public int count(int moduleId);
	
	public Map<String, Object> getNext(int articleId);
	public Map<String, Object> getPrevious(int articleId);
}
